using UnityEditor;
using UnityEngine;
using System.Collections.Generic;

[AddComponentMenu("Bone/BoneView")]
public class cBoneView : MonoBehaviour
{
	public string[] names;
	
	public string root;
	
	public int selectint;
	
	public void GetBone()
	{
		List<string> namelist = new List<string>();

		SkinnedMeshRenderer []thisRenderer = this.GetComponents<SkinnedMeshRenderer>();
	
		foreach ( SkinnedMeshRenderer currentRenderer in thisRenderer )
		{
			
			for ( int i = 0 ; i < currentRenderer.bones.Length ; i++ )
			{
				
				if ( currentRenderer.bones[i] )
				{
					
					namelist.Add( currentRenderer.bones[i].name );
					
				}
				
			}			
			
			names = namelist.ToArray();
		}
	}
	
}
